#ifndef TABPAGE_H
#define TABPAGE_H

#include "pch.h"
#include "mywebview.h"

class tabPage : public QMainWindow
{
    Q_OBJECT
public:
    explicit tabPage(QTabWidget *parent = 0);
    ~tabPage();
    void load(const QUrl &url);
    QString getTitle();
    QUrl url();
    myWebView* getBrowser();
    
signals:
    void OpenLinkInNewTab(const QUrl &url);
    void changeTitle(const QString &title);
    void exitApplication();
    
public slots:

protected slots:
    void adjustLocation();
    //void changeLocation();
    void setProgress(int p);
    void adjustTitle();
    void finishLoading(bool);
    void startLoading();
    void GoHome();
    void sendOpenNewTab(const QUrl &url) { emit OpenLinkInNewTab(url); }
    void aboutMySpacesSlot();
    void SettingsSlot();
    void loadInspector(bool);
    void exitApp();
    void showMenu();
    void showDM();

protected:
    void addjQuery();
    void CreateMenu();
    QString jQuery;

private:
    QSplitter *m_splitter;
    myWebView * Browser;
    myWebInspector *m_inspector;
    QToolBar * toolBar;
    QToolButton * goHomeButton;
    QToolButton * inspectorButton;
    QToolButton * mainMenuButton;
    QLineEdit * locationEdit;
    QMenu *mainMenu;
    QString *title;
    bool showInspector;
    int progress;

    /* Navigation buttons */
    QToolButton *forward;
    QToolButton *back;
    QToolButton *ReloadStop;
};

#endif // TABPAGE_H
